<script>on mouseUpfullhelpend mouseUpon mouseenterhelper "Click here for more help for HTML Grinder."end mouseenter</script>
</part>
<name></name>
<script>on processif there is no file (line 2 of cd fld basefolder) thenbeepanswer "The file you have specified for the Index doesn't exist. Click 窶彜elect Index File...窶 to choose a file."elseglobal indexlistput empty into indexlistpass processend ifend processon converter thefile,thecontentsglobal indexlistput line 2 of cd fld basefolder into baserput relativepath(baser,thefile) into thePathnameput extractTitle(thecontents) into theTitleif thetitle is empty then put filename(thefile) into thetitleif the hilite of cd btn "alphabetize" is true and word 1 of theTitle is "The" thendelete word 1 of theTitleput ", The" after theTitleend ifput theTitle &"窶「"&ThePathName &return after indexlistend converteron alldoneglobal indexlistset the itemdelimiter to "窶「"if the hilite of cd btn "alphabetize" is truethen sort lines of indexlist by item 1 of eachput the selectedtext of cd btn "format" into theformatrepeat with x = 1 to the number of lines in indexlistset cursor to busyput line x of indexlist into thisOneput item 1 of thisone into theTitleput item 2 of thisone into thePathget buildLink(theTitle,ThePath,theformat)put it into line x of indexlistend repeatset the itemdelimiter to ","if word 1 of theformat is "Unordered" thenput "<ul>"&return before indexlistput "</ul>" after indexListelse if word 1 of theformat is "ordered" thenput "<ol>"&return before indexlistput "</ol>" after indexListend ifget attachindex(indexlist,line 2 of cd fld basefolder)if it is emptythen get "The index has been added to the file."put empty into indexlistsend "alldone it" to homie()end alldonefunction buildLink theTitle,thePath,formatget"<a href=""e&thePath"e&">"&theTitle&"</a>"if word 1 of format contains "ordered"then get "<li>"&itget it & word 2 of formatreturn itend buildLinkfunction attachindex theIndex,thefileopen file thefileread from file thefile until eofclose file thefileput it into thecontents--put smartattach(thecontents,"<!--Index-->","<!--End of Index-->",theIndex,the selectedtext of cd btn "Append",cd fld texto) into newcontents--if newcontents contains "Error:"then return newcontentselseopen file thefilewrite newcontents to file thefileclose file thefilereturn ""end ifend attachindexon resetwheelput empty into cd fld basefolderput "</body>" into cd fld textoshow cd fld textoset the hilite of cd btn alphabetize to trueselect line 4 of cd btn formatselect line 3 of cd btn appendput the left of cd btn append into theleftset the width of cd btn append to 129set the left of cd btn append to theleftpass resetwheelend resetwheel</script>